<?php  $this->load->view('admin/slider/link_bar');?>
		<form method="post" action="{$base_url}admin/news/delete" class="form">
		<div class="box_function">
		<table width="747" border="0" cellpadding="0" cellspacing="0" class="listproduct" id="listproduct">
				<tr>
					<td class="tilte_list_pro">
						<input name="checkme" class="noborder" onclick="checkDelBoxes(this.form, 'categoryBox[]', this.checked)" type="checkbox">
					</td>
					<td class="tilte_list_pro">
						ID<br>

					</td>
					<td class="tilte_list_pro">
						Image<br>
					</td>
					<td class="tilte_list_pro">
						Name
					</td>
					<td class="tilte_list_pro">
						Position
					</td>
					<td class="tilte_list_pro">
						Displayed
					</th>
					<td class="tilte_list_pro" style="width: 79px;">
						Actions
					</td>
				</tr>
				<?php
				for($i = 0; $i < count($rows); $i++){
					$id = $rows[$i]['id'];
					$name = $rows[$i]['vi_title'];
					$image = $rows[$i]['image'];
					$link = $rows[$i]['url'];
					if (file_exists(SLIDER_IMAGE_PATH . $image))
						$image = '<img src="'. base_url(SLIDER_IMAGE_PATH . $image) .'" height="100px" width="200px" />';
					else 
						$image = "No image";
					$enlable = $rows[$i]['active'] == 1 ? 'checked.jpg' : 'nocheck.jpg';
					
					$up = '';
					$down = '';
					
					if ($rows[$i]['id_preview']){
						$up = anchor(site_url('admin/slider/change_order/' . $rows[$i]['id_preview'] . '/' .$rows[$i]['id'] ), 'Up');
					}
					
				if ($rows[$i]['id_next']){
						$down = anchor(site_url('admin/slider/change_order/' . $rows[$i]['id'] . '/' .$rows[$i]['id_next'] ), 'Down');
					}
					
                    if($i % 2 == 0) $css_class = 'row1';
                            else $css_class = 'row2';
				?>
				<tr onMouseOver="" class="<?php echo $css_class ?>">
					<td class="product center">
						<input name="categoryBox[]" value="<?php echo $id?> " class="noborder" type="checkbox"></td>
					<td class="product center" onclick="document.location = '#'">
					<?php echo $id?> 
					</td>
				
					<td class="product" onclick="document.location = '#'">
					<?php echo $image?> 
					</td>
					<td class="product" onclick="document.location = '#'">
						<?php echo anchor($link, $name)?>
					</td>
					<td class="product" onclick="document.location = '#'">
						<?php echo $up . " " . $down?>
					</td>
					<td class="product center" onclick="document.location = '#'">
						<img src="<?php echo base_url().'images/admin/'.$enlable?>">
					</td>
					<td class="product center">
						<a href="<?php echo site_url('admin/slider/edit/'.$id)?>">
							<img src="<?php echo base_url()?>images/admin/edit.gif" alt="Edit" title="Edit" border="0">
						</a>
				
						<a href="<?php echo site_url('admin/slider/delete/'.$id)?>" onclick="return confirm('Delete item #<?php echo $id?> ?');">
						<img src="<?php echo base_url()?>images/admin/delete.gif" alt="Delete" title="Delete" border="0">
						</a>
					</td>
				</tr>
				<?php
				}
				?>
	<tr>
		<td colspan="9">
			<p>
			<input class="button" name="submitDelcategory" value="Delete selection" onclick="return confirm('Delete selected items?');" type="submit">
			</p>
			
		</td>
	</tr>
</table>
</div>
		</form>
		<div>
		<?php echo $this->pagination->create_links();?>
		</div>